feat(search): implement advanced search with filters, pagination, and… - #204
Merged
ayomideadeniran merged 1 commit intoApr 25, 2026
Conversation
… full-text search capabilities
|
@ekwe7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
@ekwe7 Hi, all checks must pass before I can merge the PR. Please review the failing checks, fix the issues, and update the PR once everything is passing. |
Contributor
|
Pr under review, i will get back to you if i find any wrong implementations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #197
Backend - Implement Advanced Search with Filters, Pagination, and Full-Text Search
Description
This PR implements a comprehensive search system for the Web3 Student Lab backend with the following features:
Key Components Added:
Search Infrastructure (
src/search/):SearchService.ts- Base search service classSearchQueryBuilder.ts- Dynamic query building for filters and searchSearchValidator.ts- Input validation and sanitizationPaginationHelper.ts- Pagination logic for both offset and cursor methodsFilterParser.ts- Advanced filter parsing from query stringsEntity-Specific Search Services:
CourseSearchService.ts- Search courses with title, description, instructorStudentSearchService.ts- Search students by name and emailCertificateSearchService.ts- Search certificates with enriched student/course dataAPI Endpoints (
src/routes/search/):GET /api/search/courses- Search coursesGET /api/search/students- Search studentsGET /api/search/certificates- Search certificatesGET /api/search/all- Global search across all entitiesDatabase Optimizations:
API Usage Examples:
Response Format:
{ "data": [...], "pagination": { "page": 1, "limit": 10, "total": 45, "hasMore": true }, "metadata": { "query": "soroban", "filters": { "credits": { "gte": 3 } }, "sortBy": "title:asc", "executionTime": "45ms", "totalResults": 45 } }Reference Issues
Fixes #197 Backend - Implement Advanced Search with Filters, Pagination, and Full-Text Search
Type of Change
Checklist: